
malloc.o:     file format elf64-littleaarch64


Disassembly of section .text:

0000000000000000 <immobility>:
#include <stdlib.h>
#include <string.h>


int immobility()
{
   0:	a9bd7bfd 	stp	x29, x30, [sp, #-48]!
   4:	910003fd 	mov	x29, sp
	int *p;
	int d;
	int i;

	scanf("%d", &d);
   8:	910073a1 	add	x1, x29, #0x1c ; d address
   c:	90000000 	adrp	x0, 0 <immobility>
  10:	91000000 	add	x0, x0, #0x0
  14:	94000000 	bl	0 <__isoc99_scanf>
	p = (int*)malloc(sizeof(int) * d);
  18:	b9401fa0 	ldr	w0, [x29, #28] ; d value
  1c:	93407c00 	sxtw	x0, w0     ; x0 = extend w0
  20:	d37ef400 	lsl	x0, x0, #2     ; d = d << 2
  24:	94000000 	bl	0 <malloc>
  28:	f90013a0 	str	x0, [x29, #32] ; p ---> malloc request memory

	for (i = 0; i < d; i++) {
  2c:	b9002fbf 	str	wzr, [x29, #44] ; i
  30:	1400000b 	b	5c <immobility+0x5c>
		*(p + i) = i + 1;
  34:	b9802fa0 	ldrsw	x0, [x29, #44] ; x0 = i
  38:	d37ef400 	lsl	x0, x0, #2         ; x0 = i << 2
  3c:	f94013a1 	ldr	x1, [x29, #32]     ; x1 = p ---> malloc request memory
  40:	8b000020 	add	x0, x1, x0         ; x0 = p+i<<2
  44:	b9402fa1 	ldr	w1, [x29, #44]     ; w1 = i
  48:	11000421 	add	w1, w1, #0x1       ; w1 = i+1
  4c:	b9000001 	str	w1, [x0]           ; x0 = *(p+i<<2) = i+1
	for (i = 0; i < d; i++) {
  50:	b9402fa0 	ldr	w0, [x29, #44] ; w0 = i
  54:	11000400 	add	w0, w0, #0x1
  58:	b9002fa0 	str	w0, [x29, #44]
  5c:	b9401fa0 	ldr	w0, [x29, #28] ; w0 = d value
  60:	b9402fa1 	ldr	w1, [x29, #44]
  64:	6b00003f 	cmp	w1, w0
  68:	54fffe6b 	b.lt	34 <immobility+0x34>  // b.tstop
	}

	for (i = 0; i < d; i++) {
  6c:	b9002fbf 	str	wzr, [x29, #44]
  70:	1400000c 	b	a0 <immobility+0xa0>
		printf("\t%d\n", *(p + i));
  74:	b9802fa0 	ldrsw	x0, [x29, #44] ; x0 = i
  78:	d37ef400 	lsl	x0, x0, #2         ; x0 = i << 2
  7c:	f94013a1 	ldr	x1, [x29, #32]     ; x1 = p ---> malloc request memory
  80:	8b000020 	add	x0, x1, x0         ; x0 = p+i<<2
  84:	b9400001 	ldr	w1, [x0]           ; w1 = *(p+i<<2)
  88:	90000000 	adrp	x0, 0 <immobility>
  8c:	91000000 	add	x0, x0, #0x0
  90:	94000000 	bl	0 <printf>
	for (i = 0; i < d; i++) {
  94:	b9402fa0 	ldr	w0, [x29, #44]
  98:	11000400 	add	w0, w0, #0x1
  9c:	b9002fa0 	str	w0, [x29, #44]
  a0:	b9401fa0 	ldr	w0, [x29, #28]
  a4:	b9402fa1 	ldr	w1, [x29, #44]
  a8:	6b00003f 	cmp	w1, w0
  ac:	54fffe4b 	b.lt	74 <immobility+0x74>  // b.tstop
	}

	free(p);
  b0:	f94013a0 	ldr	x0, [x29, #32]
  b4:	94000000 	bl	0 <free>

	return 0;
  b8:	52800000 	mov	w0, #0x0                   	// #0
}
  bc:	a8c37bfd 	ldp	x29, x30, [sp], #48
  c0:	d65f03c0 	ret

00000000000000c4 <dynamic>:

int dynamic()
{
  c4:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  c8:	910003fd 	mov	x29, sp
	int *p;
	int i;

	for (i = 0; i < 10; i++) {
  cc:	b90017bf 	str	wzr, [x29, #20]
  d0:	1400000b 	b	fc <dynamic+0x38>
		p = (int *)malloc(sizeof(int));
  d4:	d2800080 	mov	x0, #0x4                   	// #4
  d8:	94000000 	bl	0 <malloc>
  dc:	f9000fa0 	str	x0, [x29, #24] ; p ---> malloc return address
		*p = i + 11;
  e0:	b94017a0 	ldr	w0, [x29, #20] ; i
  e4:	11002c01 	add	w1, w0, #0xb   ; w1 = i+11
  e8:	f9400fa0 	ldr	x0, [x29, #24] ; x0 = p ---> malloc request address
  ec:	b9000001 	str	w1, [x0]       ; *p = w1 = i+11
	for (i = 0; i < 10; i++) {
  f0:	b94017a0 	ldr	w0, [x29, #20]
  f4:	11000400 	add	w0, w0, #0x1
  f8:	b90017a0 	str	w0, [x29, #20]
  fc:	b94017a0 	ldr	w0, [x29, #20]
 100:	7100241f 	cmp	w0, #0x9
 104:	54fffe8d 	b.le	d4 <dynamic+0x10>
	}

	for (i = 0; i < 10; i++) {
 108:	b90017bf 	str	wzr, [x29, #20]
 10c:	1400000c 	b	13c <dynamic+0x78>
		printf("\t%d\n", *(p + i));
 110:	b98017a0 	ldrsw	x0, [x29, #20] ; x0 =  i
 114:	d37ef400 	lsl	x0, x0, #2         ; x0 i << 2
 118:	f9400fa1 	ldr	x1, [x29, #24]     ; x1 = p ---> malloc request address
 11c:	8b000020 	add	x0, x1, x0         ; x0 = p+i<<2
 120:	b9400001 	ldr	w1, [x0]           ; w1 = *(p+i<<2)
 124:	90000000 	adrp	x0, 0 <immobility>
 128:	91000000 	add	x0, x0, #0x0
 12c:	94000000 	bl	0 <printf>
	for (i = 0; i < 10; i++) {
 130:	b94017a0 	ldr	w0, [x29, #20]
 134:	11000400 	add	w0, w0, #0x1
 138:	b90017a0 	str	w0, [x29, #20]
 13c:	b94017a0 	ldr	w0, [x29, #20]
 140:	7100241f 	cmp	w0, #0x9
 144:	54fffe6d 	b.le	110 <dynamic+0x4c>
	}
}
 148:	d503201f 	nop
 14c:	a8c27bfd 	ldp	x29, x30, [sp], #32
 150:	d65f03c0 	ret

0000000000000154 <main>:

int main()
{
 154:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
 158:	910003fd 	mov	x29, sp
	//immobility();
	dynamic();
 15c:	94000000 	bl	c4 <dynamic>

	return 0;
 160:	52800000 	mov	w0, #0x0                   	// #0
}
 164:	a8c17bfd 	ldp	x29, x30, [sp], #16
 168:	d65f03c0 	ret
